//
//  LMRetweetView.m
//  李明微博
//
//  Created by apple on 15/12/16.
//  Copyright (c) 2015年 李明. All rights reserved.
//

#import "LMRetweetView.h"

#import "CZStatus.h"

#import "LMStatusFrame.h"


@interface LMRetweetView()

@property(nonatomic,weak)UILabel *nameView;

@property(nonatomic,weak)UILabel *textView;


@end

@implementation LMRetweetView


- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame] ) {
        [self setUpAllchildView];
    }
    return self;
}

- (void)setUpAllchildView
{
    UILabel * nameView= [[UILabel alloc] init];
    nameView.font = [UIFont systemFontOfSize:11];
    nameView.numberOfLines = 0;
    [self addSubview:nameView];
    _nameView = nameView;
    
    UILabel *textView = [[UILabel alloc] init];
    textView.font = [UIFont systemFontOfSize:13];
    textView.numberOfLines = 0;
    [self addSubview:textView];
    _textView = textView;
    
    
}

- (void)setStatusFrame:(LMStatusFrame *)statusFrame
{
    _statusFrame = statusFrame;
    [self setUpFrame];
    
    [self setUpData];
}

-(void)setUpData
{
    CZStatus *status = _statusFrame.status;
    
    _nameView.text = status.retweeted_status.user.name;
    
   
    
    _textView.text = status.retweeted_status.text;
    
    
    
}

-(void)setUpFrame
{
    
    _nameView.frame = _statusFrame.originalNameFrame;
    
    
    _textView.frame = _statusFrame.originalTextFrame;
}

@end
